<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'quick-edit-form',
	'enableClientValidation' => true,
	'clientOptions'=> array('validateOnSubmit'=>true),
	'htmlOptions' => array('class'=>'dialog')
)); ?>
	<div class="modal-header clearfix">
		<h4 class="pull-left">Edit '<?php echo $model->title ?>'
			<a href="<?php echo Yii::app()->createAbsoluteUrl('admin/post/update', array('id'=>$model->id)) ?>" target="_blank">
				<i class="icon-edit" style="vertical-align: middle;"></i>
			</a>
		</h4>
		<button class="btn btn-primary pull-right" type="submit">Save</button>
	</div>
	<div class="modal-body" style="max-height: none">
		<ul class="nav nav-tabs">
			<li class="active"><a href="#general" data-toggle="tab">General</a></li>
			<li><a href="#meta" data-toggle="tab">Meta</a></li>
		</ul>
		
		<div class="tab-content">
			<div class="tab-pane active" id="general">
			<?php $this->renderPartial('/catalog/post/edit/general', array(
				'form' => $form,
				'model' => $model
			)); ?>
			</div>

			<div class="tab-pane" id="meta">
			<?php $this->renderPartial('/catalog/post/edit/meta', array(
				'form' => $form,
				'model' => $model
			)); ?>
			</div>
		</div>

	</div>
	<input type="hidden" name="returnUrl" id="returnUrl" />
<?php $this->endWidget(); ?>
<script>
//<![CDATA[
CKEDITOR.replace('Post_content', { height: 320 });
$('#returnUrl').val(document.URL);
//]]>
</script>